import { reactive} from 'vue'
//添加修改用户信息
export interface DepartmentSaveOrUpdateParam {
    pid:string,
    departmentName:string,
    departmentSort:number,
    isChildExist:boolean,
    departmentState:string
}

//添加修改对象
export const DepartmentSaveOrUpdateParam = reactive<DepartmentSaveOrUpdateParam>({
    pid: '',
    departmentName: '',
    departmentSort: 0,
    isChildExist: false,
    departmentState:'',
});

export function DepartmentFromInfo(fromObj:any){
    DepartmentSaveOrUpdateParam.pid=fromObj!=null?fromObj.pid:"";
    DepartmentSaveOrUpdateParam.departmentName=fromObj!=null?fromObj.departmentName:"";
    DepartmentSaveOrUpdateParam.departmentSort=fromObj!=null?fromObj.departmentSort:0;
    DepartmentSaveOrUpdateParam.isChildExist=fromObj!=null?fromObj.isChildExist:false;
    DepartmentSaveOrUpdateParam.departmentState=fromObj!=null?fromObj.isEnabled:"NORMAL";
}
